<template>
	<view>
		<view v-if="onlineShow" style="width: 100%;background: #fff">
			<view class=""  style="width: 180rpx;">
				<van-tabs :active="active" @change="onChanges" color="#FF9839">
					<van-tab v-for="(item,idx) in list"  :key="idx" :title="item.itemText"></van-tab>
				</van-tabs>
			</view>
		
		<!-- 	<view class="" v-if="active == 0">
			<follow></follow>
			</view>
			<view class="" v-else-if="active == 1">
				<love :count="1"></love>
			</view>
			<view class="" v-else-if="active == 2">
				<love :count="2"></love>
			</view> -->
			<!-- <view class="OneD" > -->
				<oneto v-if="active == 0"></oneto>
			<!-- </view> -->
		</view>
		<view v-if="!onlineShow">
			<view class="nodataWrap">
				<image class="noMoreImg" src="../../../static/noMessage.svg" mode="aspectFill" lazy-load="false" @error="" @load=""></image>
			<view class="fontInfo">敬请期待...</view>
		</view>
		</view>
		<!-- 底部tab -->
		<!-- flag等于几取决于组件页面的id -->
		<tablebox class="flex:none" flag="4"></tablebox>
	</view>
</template>
<script>
	import tablebox from '../../../components/tabBox.vue';
	import oneto from '../../../components/OneToOne.vue';
	import { showInfoFunc } from '../../../utils/common';
	export default {
		components: {
			tablebox,
			oneto,
		},
		data() {
			return {
				onlineShow: false,
				active: 0, // tab选择
				list: [
				// 	{
				// 	id: '1',
				// 	itemText: '关注'
				// }, {
				// 	id: '2',
				// 	itemText: '心理'
				// }, {
				// 	id: '3',
				// 	itemText: '爱情'
				// },
				{
					id: '4',
					itemText: '一对一'
				}],
				
			}
		},
		onLoad(value){
			this.active = 0;
			wx.setEnable1v1Chat({
			  enable: true,
			  success: (res) => {
			  },
			  fail: (err) => {
			  }
			})
			this.onlineShow = showInfoFunc("在线") == undefined ? false : true
		},
		methods: {
			getList(){
				
			},
			onChanges(e) {
				// console.log(this.nums,'eee')
				this.active = e.detail.index,
					this.getList('classify');
			}
		}
	};
</script>
<style scoped lang='less'>.nodataWrap{
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	.noMoreImg{
		width: 400rpx;
		height: 400rpx;
	}
	.fontInfo{
		font-size: 28rpx;
		font-family: PingFangSC, PingFang SC;
		font-weight: 400;
		color: #737B80;
		line-height: 40rpx;
	}
}

</style>
<style>
page{
	background-color: #f5f5f5;
}
</style>